Improve code quality and add status badges to README - #23
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
CodeQL cleanup: - Add internal PathHelpers.SafePathCombine helper (src + duplicate in IntegrationTests, which has no ProjectReference to main by design) and replace ~95 Path.Combine call sites across src and test projects to resolve cs/path-combine findings. - Add clarifying comments to 10 intentionally-broad catch-of-all-exceptions sites (UI/drag-drop/best-effort boundaries) rather than narrowing, since narrowing would contradict their documented never-throws contracts. - Fix 2 cs/linq/missed-select findings, 1 missed-readonly-modifier (ViewDefinitionModel._exposeTargets), 1 useless-upcast, and 1 dispose-not-called-on-throw (WorkspaceSubsystemTests). - Refactor AppFixture.cs's LinuxDriver into a Create factory method that disposes its HttpCommandExecutor on constructor failure, fixing a cs/local-not-disposed finding. SonarQube cleanup: - Remove a redundant null-forgiving operator and add a Regex timeout and a reflection-safety comment in SourceTextDocumentView.axaml.cs. - Make AboutDialogViewModel's ApplicationName/Tagline/Copyright, SysmlSnippetGenerator.SanitizeIdentifier, and two Avalonia drag-over handlers static where they access no instance state. - Introduce a shared MIT-license constant and replace a LINQ FirstOrDefault with a Count/indexer check. - Rename FileWatcher.PendingChanges (a collection-copying property) to GetPendingChanges(), updating all call sites and its design doc. - Extract a helper method from ViewDefinitionModel.ValidateAgainstWorkspace to reduce cognitive complexity. - Convert ~20 CommunityToolkit.Mvvm [ObservableProperty] backing fields across 7 view models to C# 13 partial auto-properties. - Add a missing assertion to a previously assertion-less test case (DiagramDocumentViewModelTests.CopyAsSysmlAsync_NoClipboardServiceAssigned_DoesNotThrow). Also adds README badges (forks/stars/contributors/license/build/SonarCloud quality/security/GitHub Release). All changes validated: dotnet build (0 warnings/errors), build.ps1 -Test (290/290 passed), build.ps1 -IntegrationTest (10/10 passed), dotnet reqstream --lint (clean), lint.ps1 (clean). Reviewed via code-review and formal-review agents (gpt-5.4-mini) across all 18 affected review-sets, all confirmed SUCCEEDED. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request contains a mix of documentation improvements, codebase refactoring, and enhanced error handling. The most significant changes include the addition of project status badges to the
README.md, improved error handling and user feedback throughout the UI event boundaries, refactoring of several view models to use public properties for data binding, and documentation clarifications for the file watcher subsystem. There are also minor code improvements for path handling and syntax highlighting safety.Documentation and Project Metadata:
README.mdand defined their references at the bottom for improved project visibility and status reporting. [1] [2]PendingChangeswith "pending-change set" and updating method signatures and descriptions for accuracy. [1] [2] [3] [4] [5]Error Handling and User Feedback:
ViewModel Refactoring for Data Binding:
[ObservableProperty]for improved data binding and testability inDiagnosticsToolViewModel,PredefinedViewsToolViewModel, andQueryDialogViewModel. [1] [2] [3]Code Quality and Safety Improvements:
PathHelpers.SafePathCombinefor safer path construction in application initialization and design-time shell factory. [1] [2]Other Minor Improvements:
AboutDialogViewModeland eliminated string literal duplication for license names. [1] [2]These changes collectively improve project documentation, robustness, maintainability, and the user experience.